package sun.superstring.object;

public class StudentTest {
    public static void main(String[] args) {
        Student s1 = new Student();
        s1.name = "波妞";
        s1.gender = "女";
        s1.chinese = 100;
        s1.math = 100;
//        System.out.println(s1.name + "的总成绩是：" + (s1.chinese + s1.math));
//        System.out.println(s1.name +"的平均成绩是：" + (s1.chinese + s1.math) / 2);

        // 封装思想：
        //把数据和对数据的处理放到同一类中去
        s1.printAllScore();
        s1.printAverageScore();
        System.out.println(s1);

        Student s2 = new Student();
        s2.name = "波仔";
        s2.gender = "男";
        s2.chinese = 59;
        s2.math = 100;
//        System.out.println(s2.name + "的总成绩是" + (s2.chinese + s2.math));
//        System.out.println(s2.name + "的平均成绩是" + (s2.chinese + s2.math) / 2);
        s2.printAllScore();
        s2.printAverageScore();
        System.out.println(s2);

    }
}
